package com.winit.openapi.sms.validator;

import com.alibaba.fastjson.JSONObject;
import com.winit.openapi.util.ValidateUtil;

/**
 * 线上充值 校验器类
 * 
 * @version <pre>
 * Author	Version		Date		Changes
 * keke.xu 	1.0  		2016年1月25日 	Created
 * 
 * </pre>
 * @since 1.
 */
public class OnLineRechargeFieldValidator {

    /**
     * 校验创建线上充值单参数保存到草稿 校验字段长度
     * 
     * @param json
     */
    public static void validCreateField(JSONObject json) {
        ValidateUtil.validMaxLength(json, "currencyCode", 3);
        ValidateUtil.validNotNull(json, "payAmount");
        ValidateUtil.validMaxLength(json, "remark", 2000);

    }

    /**
     * 创建银盈通调用记录校验
     * @param json
     */
    public static void validCreateOperationRecordField(JSONObject json) {
        ValidateUtil.validNotNull(json, "advanceType");
        ValidateUtil.validNotNull(json, "advanceName");
        ValidateUtil.validNotNull(json, "payChannel");
        ValidateUtil.validNotNull(json, "certNo");
    }
}
